package com.rcadmin.busi.web.dao;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.rcadmin.busi.web.ddl.WebBlockVar;
import com.rcadmin.common.contant.IsEff;
import com.rcadmin.core.jpa.BaseDao;
import com.rcadmin.util.SqlUtil;

/**
 * 内容参数信息DAO
 * @author tanson lam
 * @create 2016年10月26日
 */
@Component
public class BlockVarDao {
	@Resource
	private BaseDao baseDao;

	/**
	 * 查询
	 * 
	 * @param shopId
	 * @param groupKeys
	 * @return
	 */
	public List<WebBlockVar> getBlockVars(List<Integer> webBlockIds) {
		StringBuilder query = new StringBuilder();
		query.append(" and web_block_id in (")
				.append(SqlUtil.array2InCondition(webBlockIds)).append(")");
		query.append(" and iseff = '").append(IsEff.EFFECTIVE).append("'");
		return baseDao.find(query.toString(), WebBlockVar.class);
	}

}
